package apiday05.io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class OOSDemo {
    public static void main(String[] args)  throws IOException {
        FileOutputStream fos = new FileOutputStream("person.obj");
        ObjectOutputStream oos = new ObjectOutputStream(fos);

        Person p = new Person();
        p.setName("吴花果");
        p.setAge(18);
        p.setGender("男");
        p.setOtherInfo(new String[]{"厉害","强","有实力"});

        oos.writeObject(p);
        System.out.println("写出完毕");
        oos.close();

    }
}
